package com.systar.activity.report.users;

public class User
{
	private final String name;
	private final Role[] roles;
	
	public User(String name, Role[] roles)
	{
		this.name = name;
		this.roles = roles;
	}

	public String getName()
	{
		return name;
	}

	public boolean hasRole(Role role)
	{
		for (Role granted : roles)
		{
			if (role == granted)
				return true;
		}
		return false;
	}

}
